package com.yanqu.road.logic.bussiness.palace;

import com.yanqu.road.entity.estatewar.palace.*;
import com.yanqu.road.logic.bussiness.DaoHelper;

import java.util.List;
import java.util.Map;

public class PalaceBussiness {
    public static Map<Long, UserPalaceData> getUserPalaceDataMap(int activityId) {
        return DaoHelper.getUserPalaceDataDaoImpl().getUserPalaceDataMap(activityId);
    }

    public static boolean addUserPalaceData(UserPalaceData data){
        return DaoHelper.getUserPalaceDataDaoImpl().add(data);
    }

    public static boolean updateUserPalaceData(UserPalaceData data){
        return DaoHelper.getUserPalaceDataDaoImpl().update(data);
    }

    public static List<PalaceBattleRecord> getPalaceBattleRecordList(int activityId, long userId, int maxCount) {
        return DaoHelper.getPalaceBattleRecordDaoImpl().getPalaceBattleRecordList(activityId, userId, maxCount);
    }

    public static boolean addPalaceBattleRecord(PalaceBattleRecord data){
        return DaoHelper.getPalaceBattleRecordDaoImpl().add(data);
    }

    public static Map<Integer, PalaceFloorInfo> getPalaceFloorInfoMap(int activityId) {
        return DaoHelper.getPalaceFloorInfoDaoImpl().getPalaceFloorInfoMap(activityId);
    }

    public static boolean addPalaceFloorInfo(PalaceFloorInfo data){
        return DaoHelper.getPalaceFloorInfoDaoImpl().add(data);
    }

    public static boolean updatePalaceFloorInfo(PalaceFloorInfo data){
        return DaoHelper.getPalaceFloorInfoDaoImpl().update(data);
    }

    public static List<PalaceBattleNotice> getPalaceBattleNoticeList(int activityId, int maxCount) {
        return DaoHelper.getPalaceBattleNoticeDaoImpl().getPalaceBattleNoticeList(activityId, maxCount);
    }

    public static boolean addPalaceBattleNotice(PalaceBattleNotice data){
        return DaoHelper.getPalaceBattleNoticeDaoImpl().add(data);
    }

    public static void getPalaceUserDataMap(int activityId, Map<Long, List<PalaceUserData>> palaceAideMap, Map<Long, PalaceUserData> palaceUserDataMap) {
        DaoHelper.getPalaceUserDataDaoImpl().getPalaceUserDataMap(activityId, palaceAideMap, palaceUserDataMap);
    }

    public static boolean addPalaceUserData(PalaceUserData data){
        return DaoHelper.getPalaceUserDataDaoImpl().add(data);
    }

    public static boolean updatePalaceUserData(PalaceUserData data){
        return DaoHelper.getPalaceUserDataDaoImpl().update(data);
    }

    public static Map<Long, PalaceRewardTime> getPalaceRewardTimeMap(int activityId) {
        return DaoHelper.getPalaceRewardTimeDaoImpl().getPalaceRewardTimeMap(activityId);
    }

    public static boolean addPalaceRewardTime(PalaceRewardTime data){
        return DaoHelper.getPalaceRewardTimeDaoImpl().add(data);
    }

    public static Map<Long, Map<Long, PalaceAideDismissData>> getPalaceAideDismissDataMap(int activityId) {
        return DaoHelper.getPalaceAideDismissDataDaoImpl().getPalaceAideDismissDataMap(activityId);
    }

    public static boolean addPalaceAideDismissData(PalaceAideDismissData data){
        return DaoHelper.getPalaceAideDismissDataDaoImpl().add(data);
    }

    public static boolean updatePalaceAideDismissData(PalaceAideDismissData data){
        return DaoHelper.getPalaceAideDismissDataDaoImpl().update(data);
    }
}
